package com.pan.behavioral.stratergy.shop;

import com.pan.behavioral.stratergy.pattern.Strategy;
import com.pan.behavioral.stratergy.pattern.StrategyContext;

public class Shop implements StrategyContext {


    private Strategy strategy;

    @Override
    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    public void CheckOut(double goodsPrices){
        System.out.println("需要支付："+ strategy.operation(goodsPrices));
    }
}
